//
//  BTEnterErrorDispose.h
//  BTShike
//
//  Created by 刘军林 on 2019/6/14.
//  Copyright © 2019 刘军林. All rights reserved.
//

#ifndef BTEnterErrorDispose_h
#define BTEnterErrorDispose_h

#import "NSString+BTExtension.h"
#import "MrjSVProgressHUD.h"
#import "MrjToast.h"

#define BTALERTSHOW(message) \
[MrjToast makeToast:message makeView:self.view]; \


#define BTPhoneEmpty(phone) \
if (phone.length == 0) { \
    BTALERTSHOW(@"请输入手机号") \
    return; \
}

#define BTPhoneValidVerify(phone) \
if (![phone isValidatePhone]) {\
    BTALERTSHOW(@"请输入正确的手机号") \
    return; \
}

#define BTSMSCodeEmpty(code) \
if (code.length == 0) {\
    BTALERTSHOW(@"请输入验证码") \
    return; \
}

#define BTPWDEmpty(pwd) \
if(pwd.length == 0) {\
    BTALERTSHOW(@"请输入密码");\
    return; \
}

#define BTPWDValidVerify(pwd)\
if(![pwd isValidatePassword]) { \
    BTALERTSHOW(@"数字、字母、特殊字符3选2且不小于六位") \
    return ; \
}

#define BTPWD2Consistent(pwd, pwd2) \
if(![pwd isEqualToString:pwd2]) { \
    BTALERTSHOW(@"两次密码不一致") \
    return ; \
}



#endif /* BTEnterErrorDispose_h */
